package com.miracle9.game.dao;

import com.miracle9.game.entity.GoldSharkRoom;
import org.springframework.stereotype.Repository;

@Repository
public class GoldSharkRoomDao extends SqlOperating<GoldSharkRoom, Integer> {

    public GoldSharkRoom getById(int id) {
        return (GoldSharkRoom) getById(Integer.valueOf(id));
    }

    public void updateDeskNumById(int deskNum, int id) {
        String hql = "update GoldSharkRoom set deskNum = deskNum + ? where id = ?";
        q_CreateSql(hql, new Object[]{Integer.valueOf(deskNum), Integer.valueOf(id)}).executeUpdate();
    }

}

